<template>
  <elm-page-bb>
    <el-form ref="model" :model="model" size="small" label-width="80px">
      <elm-row>
        <el-form-item label="类别名称" :rules="[{ required: true, message: '名称必须填写'}]">
          <el-input v-model="model.name"></el-input>
        </el-form-item>
        <el-form-item label="上级类别">
          <elm-select-tree v-model="model.pid" url="/business/jxc/goods/type/GetTree" path-url="/business/jxc/goods/type/GetPath"></elm-select-tree>
        </el-form-item>
      </elm-row>
      <elm-row>
        <el-form-item label="顺序" :rules="[{ type: 'number', message: '顺序必须为数字'},{ required: true, message: '必须填写'}]">
          <el-input v-model.number="model.sort"></el-input>
        </el-form-item>
        <el-form-item></el-form-item>
      </elm-row>
      <el-form-item label="备注">
        <el-input type="textarea" v-model="model.remarks" :rows="2"></el-input>
      </el-form-item>
    </el-form>
    <template #bottom>
      <elm-save-button type="success" size="small" url="/business/jxc/goods/type/Upsert" :data="model">立即保存</elm-save-button>
      <el-button @click="close" size="small">取消</el-button>
    </template>
  </elm-page-bb>
</template>

<script>
export default {
  extends: elmVueBase,
  data() {
    return {
      model: {
        pid: elm.dialog.request.pid,
        quantity:0,
      },
    }
  },
  async created() {
  },
  methods: {
  }
}
</script>

<style scoped>
</style>